package com.lovo.pis.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lovo.pis.dto.CountBean;
import com.lovo.pis.dto.PageBean;
import com.lovo.pis.dto.SellOrderBean;
import com.lovo.pis.service.ISellGoodsService;
import com.lovo.pis.service.ISellOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sellGoods")
public class SellGoodsController {

    @Autowired
    ISellGoodsService sellGoodsService;

    @RequestMapping("/typeCount")
    public List<CountBean> getSellGoodsTypeCount(String startDate, String endDate){
        return sellGoodsService.getSellGoodsTypeCount(startDate,endDate);
    }
    @RequestMapping("/nameCount")
    public List<CountBean> getSellGoodsNameCount(String startDate, String endDate){
        return sellGoodsService.getSellGoodsNameCount(startDate,endDate);
    }
    @RequestMapping("/MonthSellCount")
    public List<List<Object>> getMonthSellCount(String year){
        return sellGoodsService.getMonthSellCount(year);
    }
}
